package com.zl.service.impl;

import com.zl.dao.CompanyDao;
import com.zl.dao.ProjectDao;
import com.zl.dao.StateDao;
import com.zl.domain.Project;
import com.zl.service.ProjectService;
import net.sf.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class ProjectServiceImpl extends BaseServiceImpl<Project> implements
        ProjectService {
    @Autowired
    public CompanyDao companyDao;
    @Autowired
    public StateDao stateDao;
    @Autowired
    public ProjectDao projectDao;


    @Override
    public JSONObject findTypes() {
        return new JSONObject().accumulate("states", stateDao.findAll())
                .accumulate("companies", companyDao.findAll());
    }

}
